
cmake_minimum_required(VERSION 3.11)

project(dbus_demo VERSION 1.0.0 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_AUTOMOC ON)
# set(CMAKE_AUTORCC ON)
# set(CMAKE_AUTOUIC ON)

if(CMAKE_VERSION VERSION_LESS "3.7.0")
    set(CMAKE_INCLUDE_CURRENT_DIR ON)
endif()

# find_package(Qt5Core)
find_package(Qt5 COMPONENTS Core REQUIRED)
find_package(Qt5 COMPONENTS DBus REQUIRED)

set(SERVICE_NAME ${PROJECT_NAME}_server)
set(CLIENT_NAME ${PROJECT_NAME}_client)

add_executable(${SERVICE_NAME} service.cpp)
add_executable(${CLIENT_NAME} client.cpp)

target_link_libraries(${SERVICE_NAME} Qt5::Core Qt5::DBus)
target_link_libraries(${CLIENT_NAME} Qt5::Core Qt5::DBus)
